package 预习;

public class PigYear {
    public static void main(String[] args) {
        //for (int year = 1949; year <= 2019; year++) {
        //    if ((2019 - year) % 12 == 0) {
        //        System.out.println(year + "年是猪年");
        //    } else {
//
        //    }
        //}

        int year = 1949;
        while (year <= 2019) {
            if ((2019-year)%12==0){
                System.out.println(year + "年是猪年");
            }
            year++;

        }
    }
}
